// 接口统一管理处

import Ajax from "@/ajax/Ajax";
import mockAjax from "@/ajax/mockAjax";

// 获取轮播图和楼层数据
export const reqBannerList = (method) => {
  return mockAjax({
    url: "/banner",
    method: "get",
  });
};

export const reqFloorList = () => {
  return mockAjax({
    url: "/floor",
    method: "get",
  });
};

// 获取三级分类

export const reqCategoryList = () => {
  return Ajax({
    url: "/product/getBaseCategoryList",
    method: "get",
  });
};

// 搜索商品
/*
{
  "category1Id": 0,
  "category2Id": 0,
  "category3Id": 0,
  "keyword": "string",
  "order": "string",
  "pageNo": 0,
  "pageSize": 0,
  "props": [
    "string"
  ],
  "trademark": "string"
}*/
// 无序对象化参数
export const reqGoodsListInfo = (searchParams) => {
  return Ajax({
    url: "/list",
    method: "post",
    data: searchParams,
  });
};
